package cn.johnyu.client;

import org.example.commons.dto.AccountDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(name = "account-service")
public interface AccountClient {

    @GetMapping("/accounts/{id}")
    AccountDto loadAccount(@PathVariable("id") int id);


    @GetMapping("/accounts")
    AccountDto findAllAccount();
}
